package cn.qiao.lock;

import java.util.concurrent.locks.ReentrantLock;

/**
 * desc:
 *
 * @author qiao
 * @date 2023年03月15日 15:31
 */
public class LockDemo {

    public static void main(String[] args) {

        ReentrantLock lock = new ReentrantLock();
        lock.lock();
        try {
            if (lock.tryLock()) {

            }
        }catch (Exception e){

        }finally {
            lock.unlock();
        }

    }


}
